home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbdates / dates.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  16.2 KB  |  570 lines

  1. VERSION 2.00
  2. Begin Form Calendar 
  3.    BackColor       =   &H00FFFFFF&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Calendar"
  6.    ClientHeight    =   2700
  7.    ClientLeft      =   1890
  8.    ClientTop       =   2070
  9.    ClientWidth     =   2745
  10.    ForeColor       =   &H00C0C0C0&
  11.    Height          =   3390
  12.    Icon            =   DATES.FRX:0000
  13.    Left            =   1830
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    ScaleHeight     =   2700
  17.    ScaleWidth      =   2745
  18.    Top             =   1440
  19.    Width           =   2865
  20.    Begin SSCommand DayButton 
  21.       BevelWidth      =   1
  22.       Font3D          =   0  'None
  23.       ForeColor       =   &H00000000&
  24.       Height          =   315
  25.       Index           =   36
  26.       Left            =   480
  27.       TabIndex        =   40
  28.       Top             =   2280
  29.       Width           =   375
  30.    End
  31.    Begin SSCommand DayButton 
  32.       BevelWidth      =   1
  33.       Font3D          =   0  'None
  34.       ForeColor       =   &H000000C0&
  35.       Height          =   315
  36.       Index           =   35
  37.       Left            =   120
  38.       TabIndex        =   39
  39.       Top             =   2280
  40.       Width           =   375
  41.    End
  42.    Begin SSCommand DayButton 
  43.       BevelWidth      =   1
  44.       Font3D          =   0  'None
  45.       ForeColor       =   &H00000000&
  46.       Height          =   315
  47.       Index           =   34
  48.       Left            =   2280
  49.       TabIndex        =   38
  50.       Top             =   1980
  51.       Width           =   375
  52.    End
  53.    Begin SSCommand DayButton 
  54.       BevelWidth      =   1
  55.       Font3D          =   0  'None
  56.       ForeColor       =   &H00000000&
  57.       Height          =   315
  58.       Index           =   33
  59.       Left            =   1920
  60.       TabIndex        =   37
  61.       Top             =   1980
  62.       Width           =   375
  63.    End
  64.    Begin SSCommand DayButton 
  65.       BevelWidth      =   1
  66.       Font3D          =   0  'None
  67.       ForeColor       =   &H00000000&
  68.       Height          =   315
  69.       Index           =   32
  70.       Left            =   1560
  71.       TabIndex        =   36
  72.       Top             =   1980
  73.       Width           =   375
  74.    End
  75.    Begin SSCommand Command3D3 
  76.       AutoSize        =   1  'Adjust Picture Size To Button
  77.       BevelWidth      =   1
  78.       Font3D          =   0  'None
  79.       ForeColor       =   &H00000000&
  80.       Height          =   315
  81.       Left            =   1740
  82.       Picture         =   DATES.FRX:0302
  83.       TabIndex        =   33
  84.       Top             =   2280
  85.       Width           =   915
  86.    End
  87.    Begin SSCommand Command3D2 
  88.       AutoSize        =   1  'Adjust Picture Size To Button
  89.       BevelWidth      =   1
  90.       Font3D          =   0  'None
  91.       ForeColor       =   &H000000C0&
  92.       Height          =   315
  93.       Left            =   840
  94.       Picture         =   DATES.FRX:0604
  95.       TabIndex        =   32
  96.       Top             =   2280
  97.       Width           =   915
  98.    End
  99.    Begin SSCommand DayButton 
  100.       BevelWidth      =   1
  101.       Font3D          =   0  'None
  102.       ForeColor       =   &H00000000&
  103.       Height          =   315
  104.       Index           =   31
  105.       Left            =   1200
  106.       TabIndex        =   31
  107.       Top             =   1980
  108.       Width           =   375
  109.    End
  110.    Begin SSCommand DayButton 
  111.       BevelWidth      =   1
  112.       Font3D          =   0  'None
  113.       ForeColor       =   &H00000000&
  114.       Height          =   315
  115.       Index           =   30
  116.       Left            =   840
  117.       TabIndex        =   30
  118.       Top             =   1980
  119.       Width           =   375
  120.    End
  121.    Begin SSCommand DayButton 
  122.       BevelWidth      =   1
  123.       Font3D          =   0  'None
  124.       ForeColor       =   &H00000000&
  125.       Height          =   315
  126.       Index           =   29
  127.       Left            =   480
  128.       TabIndex        =   29
  129.       Top             =   1980
  130.       Width           =   375
  131.    End
  132.    Begin SSCommand DayButton 
  133.       BevelWidth      =   1
  134.       Font3D          =   0  'None
  135.       ForeColor       =   &H000000C0&
  136.       Height          =   315
  137.       Index           =   28
  138.       Left            =   120
  139.       TabIndex        =   28
  140.       Top             =   1980
  141.       Width           =   375
  142.    End
  143.    Begin SSCommand DayButton 
  144.       BevelWidth      =   1
  145.       Font3D          =   0  'None
  146.       ForeColor       =   &H00000000&
  147.       Height          =   315
  148.       Index           =   27
  149.       Left            =   2280
  150.       TabIndex        =   27
  151.       Top             =   1680
  152.       Width           =   375
  153.    End
  154.    Begin SSCommand DayButton 
  155.       BevelWidth      =   1
  156.       Font3D          =   0  'None
  157.       ForeColor       =   &H00000000&
  158.       Height          =   315
  159.       Index           =   26
  160.       Left            =   1920
  161.       TabIndex        =   26
  162.       Top             =   1680
  163.       Width           =   375
  164.    End
  165.    Begin SSCommand DayButton 
  166.       BevelWidth      =   1
  167.       Font3D          =   0  'None
  168.       ForeColor       =   &H00000000&
  169.       Height          =   315
  170.       Index           =   25
  171.       Left            =   1560
  172.       TabIndex        =   25
  173.       Top             =   1680
  174.       Width           =   375
  175.    End
  176.    Begin SSCommand DayButton 
  177.       BevelWidth      =   1
  178.       Font3D          =   0  'None
  179.       ForeColor       =   &H00000000&
  180.       Height          =   315
  181.       Index           =   24
  182.       Left            =   1200
  183.       TabIndex        =   24
  184.       Top             =   1680
  185.       Width           =   375
  186.    End
  187.    Begin SSCommand DayButton 
  188.       BevelWidth      =   1
  189.       Font3D          =   0  'None
  190.       ForeColor       =   &H00000000&
  191.       Height          =   315
  192.       Index           =   23
  193.       Left            =   840
  194.       TabIndex        =   23
  195.       Top             =   1680
  196.       Width           =   375
  197.    End
  198.    Begin SSCommand DayButton 
  199.       BevelWidth      =   1
  200.       Font3D          =   0  'None
  201.       ForeColor       =   &H00000000&
  202.       Height          =   315
  203.       Index           =   22
  204.       Left            =   480
  205.       TabIndex        =   22
  206.       Top             =   1680
  207.       Width           =   375
  208.    End
  209.    Begin SSCommand DayButton 
  210.       BevelWidth      =   1
  211.       Font3D          =   0  'None
  212.       ForeColor       =   &H000000C0&
  213.       Height          =   315
  214.       Index           =   21
  215.       Left            =   120
  216.       TabIndex        =   21
  217.       Top             =   1680
  218.       Width           =   375
  219.    End
  220.    Begin SSCommand DayButton 
  221.       BevelWidth      =   1
  222.       Font3D          =   0  'None
  223.       ForeColor       =   &H00000000&
  224.       Height          =   315
  225.       Index           =   20
  226.       Left            =   2280
  227.       TabIndex        =   20
  228.       Top             =   1380
  229.       Width           =   375
  230.    End
  231.    Begin SSCommand DayButton 
  232.       BevelWidth      =   1
  233.       Font3D          =   0  'None
  234.       ForeColor       =   &H00000000&
  235.       Height          =   315
  236.       Index           =   19
  237.       Left            =   1920
  238.       TabIndex        =   19
  239.       Top             =   1380
  240.       Width           =   375
  241.    End
  242.    Begin SSCommand DayButton 
  243.       BevelWidth      =   1
  244.       Font3D          =   0  'None
  245.       ForeColor       =   &H00000000&
  246.       Height          =   315
  247.       Index           =   18
  248.       Left            =   1560
  249.       TabIndex        =   18
  250.       Top             =   1380
  251.       Width           =   375
  252.    End
  253.    Begin SSCommand DayButton 
  254.       BevelWidth      =   1
  255.       Font3D          =   0  'None
  256.       ForeColor       =   &H00000000&
  257.       Height          =   315
  258.       Index           =   17
  259.       Left            =   1200
  260.       TabIndex        =   17
  261.       Top             =   1380
  262.       Width           =   375
  263.    End
  264.    Begin SSCommand DayButton 
  265.       BevelWidth      =   1
  266.       Font3D          =   0  'None
  267.       ForeColor       =   &H00000000&
  268.       Height          =   315
  269.       Index           =   16
  270.       Left            =   840
  271.       TabIndex        =   16
  272.       Top             =   1380
  273.       Width           =   375
  274.    End
  275.    Begin SSCommand DayButton 
  276.       BevelWidth      =   1
  277.       Font3D          =   0  'None
  278.       ForeColor       =   &H00000000&
  279.       Height          =   315
  280.       Index           =   15
  281.       Left            =   480
  282.       TabIndex        =   15
  283.       Top             =   1380
  284.       Width           =   375
  285.    End
  286.    Begin SSCommand DayButton 
  287.       BevelWidth      =   1
  288.       Font3D          =   0  'None
  289.       ForeColor       =   &H000000C0&
  290.       Height          =   315
  291.       Index           =   14
  292.       Left            =   120
  293.       TabIndex        =   14
  294.       Top             =   1380
  295.       Width           =   375
  296.    End
  297.    Begin SSCommand DayButton 
  298.       BevelWidth      =   1
  299.       Font3D          =   0  'None
  300.       ForeColor       =   &H00000000&
  301.       Height          =   315
  302.       Index           =   13
  303.       Left            =   2280
  304.       TabIndex        =   13
  305.       Top             =   1080
  306.       Width           =   375
  307.    End
  308.    Begin SSCommand DayButton 
  309.       BevelWidth      =   1
  310.       Font3D          =   0  'None
  311.       ForeColor       =   &H00000000&
  312.       Height          =   315
  313.       Index           =   12
  314.       Left            =   1920
  315.       TabIndex        =   12
  316.       Top             =   1080
  317.       Width           =   375
  318.    End
  319.    Begin SSCommand DayButton 
  320.       BevelWidth      =   1
  321.       Font3D          =   0  'None
  322.       ForeColor       =   &H00000000&
  323.       Height          =   315
  324.       Index           =   11
  325.       Left            =   1560
  326.       TabIndex        =   11
  327.       Top             =   1080
  328.       Width           =   375
  329.    End
  330.    Begin SSCommand DayButton 
  331.       BevelWidth      =   1
  332.       Font3D          =   0  'None
  333.       ForeColor       =   &H00000000&
  334.       Height          =   315
  335.       Index           =   10
  336.       Left            =   1200
  337.       TabIndex        =   10
  338.       Top             =   1080
  339.       Width           =   375
  340.    End
  341.    Begin SSCommand DayButton 
  342.       BevelWidth      =   1
  343.       Font3D          =   0  'None
  344.       ForeColor       =   &H00000000&
  345.       Height          =   315
  346.       Index           =   9
  347.       Left            =   840
  348.       TabIndex        =   9
  349.       Top             =   1080
  350.       Width           =   375
  351.    End
  352.    Begin SSCommand DayButton 
  353.       BevelWidth      =   1
  354.       Font3D          =   0  'None
  355.       ForeColor       =   &H00000000&
  356.       Height          =   315
  357.       Index           =   8
  358.       Left            =   480
  359.       TabIndex        =   8
  360.       Top             =   1080
  361.       Width           =   375
  362.    End
  363.    Begin SSCommand DayButton 
  364.       BevelWidth      =   1
  365.       Font3D          =   0  'None
  366.       ForeColor       =   &H000000C0&
  367.       Height          =   315
  368.       Index           =   7
  369.       Left            =   120
  370.       TabIndex        =   7
  371.       Top             =   1080
  372.       Width           =   375
  373.    End
  374.    Begin SSCommand DayButton 
  375.       BevelWidth      =   1
  376.       Font3D          =   0  'None
  377.       ForeColor       =   &H00000000&
  378.       Height          =   315
  379.       Index           =   6
  380.       Left            =   2280
  381.       TabIndex        =   6
  382.       Top             =   780
  383.       Width           =   375
  384.    End
  385.    Begin SSCommand DayButton 
  386.       BevelWidth      =   1
  387.       Font3D          =   0  'None
  388.       ForeColor       =   &H00000000&
  389.       Height          =   315
  390.       Index           =   5
  391.       Left            =   1920
  392.       TabIndex        =   5
  393.       Top             =   780
  394.       Width           =   375
  395.    End
  396.    Begin SSCommand DayButton 
  397.       BevelWidth      =   1
  398.       Font3D          =   0  'None
  399.       ForeColor       =   &H00000000&
  400.       Height          =   315
  401.       Index           =   4
  402.       Left            =   1560
  403.       TabIndex        =   4
  404.       Top             =   780
  405.       Width           =   375
  406.    End
  407.    Begin SSCommand DayButton 
  408.       BevelWidth      =   1
  409.       Font3D          =   0  'None
  410.       ForeColor       =   &H00000000&
  411.       Height          =   315
  412.       Index           =   3
  413.       Left            =   1200
  414.       TabIndex        =   3
  415.       Top             =   780
  416.       Width           =   375
  417.    End
  418.    Begin SSCommand DayButton 
  419.       BevelWidth      =   1
  420.       Font3D          =   0  'None
  421.       ForeColor       =   &H00000000&
  422.       Height          =   315
  423.       Index           =   2
  424.       Left            =   840
  425.       TabIndex        =   2
  426.       Top             =   780
  427.       Width           =   375
  428.    End
  429.    Begin SSCommand DayButton 
  430.       BevelWidth      =   1
  431.       Font3D          =   0  'None
  432.       ForeColor       =   &H00000000&
  433.       Height          =   315
  434.       Index           =   1
  435.       Left            =   480
  436.       TabIndex        =   1
  437.       Top             =   780
  438.       Width           =   375
  439.    End
  440.    Begin SSCommand DayButton 
  441.       BevelWidth      =   1
  442.       Font3D          =   0  'None
  443.       ForeColor       =   &H000000C0&
  444.       Height          =   315
  445.       Index           =   0
  446.       Left            =   120
  447.       TabIndex        =   0
  448.       Top             =   780
  449.       Width           =   375
  450.    End
  451.    Begin SSPanel Panel3D1 
  452.       BackColor       =   &H00C0C0C0&
  453.       BevelInner      =   1  'Inset
  454.       BevelWidth      =   2
  455.       Caption         =   "Panel3D1"
  456.       Font3D          =   0  'None
  457.       ForeColor       =   &H00808080&
  458.       Height          =   2715
  459.       Left            =   0
  460.       TabIndex        =   34
  461.       Top             =   0
  462.       Width           =   2775
  463.       Begin SSPanel Panel3D2 
  464.          Alignment       =   2  'Left Justify - BOTTOM
  465.          BackColor       =   &H00C0C0C0&
  466.          BevelOuter      =   1  'Inset
  467.          BevelWidth      =   2
  468.          Caption         =   "  S    M   T    W   T    F    S"
  469.          Font3D          =   0  'None
  470.          ForeColor       =   &H00800000&
  471.          Height          =   315
  472.          Left            =   120
  473.          TabIndex        =   41
  474.          Top             =   480
  475.          Width           =   2535
  476.       End
  477.       Begin SSPanel MonthBox 
  478.          BackColor       =   &H00C0C0C0&
  479.          BevelOuter      =   1  'Inset
  480.          BevelWidth      =   2
  481.          Caption         =   "January"
  482.          Font3D          =   0  'None
  483.          ForeColor       =   &H00800000&
  484.          Height          =   315
  485.          Left            =   420
  486.          TabIndex        =   35
  487.          Top             =   120
  488.          Width           =   1995
  489.       End
  490.    End
  491.    Begin Menu File 
  492.       Caption         =   "&File"
  493.       Begin Menu Exit 
  494.          Caption         =   "E&xit"
  495.       End
  496.    End
  497.    Begin Menu About 
  498.       Caption         =   "&About"
  499.    End
  500. Sub About_Click ()
  501. AboutForm.Show
  502. End Sub
  503. Sub Command3D2_Click ()
  504. TheMonth = TheMonth - 1
  505. If TheMonth = 0 Then
  506. TheMonth = 12
  507. Theyear = Theyear - 1
  508. End If
  509. FillMonth
  510. Calendar.MonthBox.Caption = Months(TheMonth) + Str$(Theyear)
  511. End Sub
  512. Sub Command3D3_Click ()
  513. TheMonth = TheMonth + 1
  514. If TheMonth = 13 Then
  515. TheMonth = 1
  516. Theyear = Theyear + 1
  517. End If
  518. FillMonth
  519. Calendar.MonthBox.Caption = Months(TheMonth) + Str$(Theyear)
  520. End Sub
  521. Sub DayButton_Click (Index As Integer)
  522. MsgBox "This is an event"
  523. End Sub
  524. Sub Exit_Click ()
  525. End Sub
  526. Sub Form_Load ()
  527. TheMonth = Month(Now)
  528. Theyear = Year(Now)
  529. ThisMonth = Month(Now)
  530. Dim I As Integer
  531. For I = 0 To 36
  532. Calendar.DayButton(I).Caption = ""
  533. Next I
  534. Months(1) = "January"
  535. Months(2) = "February"
  536. Months(3) = "March"
  537. Months(4) = "April"
  538. Months(5) = "May"
  539. Months(6) = "June"
  540. Months(7) = "July"
  541. Months(8) = "August"
  542. Months(9) = "September"
  543. Months(10) = "October"
  544. Months(11) = "November"
  545. Months(12) = "December"
  546. Calendar.MonthBox.Caption = Months(TheMonth) + Str$(Theyear)
  547. Weekdays(1) = "Sunday"
  548. Weekdays(2) = "Monday"
  549. Weekdays(3) = "Tuesday"
  550. Weekdays(4) = "Wednesday"
  551. Weekdays(5) = "Thursday"
  552. Weekdays(6) = "Friday"
  553. Weekdays(7) = "Saturday"
  554. Jan = 31
  555. Feb = 28
  556. Mar = 31
  557. Apr = 30
  558. May = 31
  559. Jun = 30
  560. Jul = 31
  561. Aug = 31
  562. Sep = 30
  563. Octr = 31
  564. Nov = 30
  565. Dec = 31
  566. StartDay = 1
  567. DOW = Weekday(DateSerial(TheMonth, Theyear, StartDay))
  568. FillMonth
  569. End Sub
  570.